package com.rm.zeyou.mapper;

import com.rm.zeyou.entity.UserAttention;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 关注表 Mapper 接口
 * </p>
 *
 * @author YanYang
 * @since 2025-03-12 15:55:09
 */
@Mapper
public interface UserAttentionMapper extends BaseMapper<UserAttention> {
    @Select("select count(*) from t_user_attention  where user_id = #{id}")
    Integer selectAttentionCount(@Param("id") Long id);

    @Delete("delete from t_user_attention where user_id = #{userId} and tid = #{tid}")
    Integer cancelAttention(@Param("userId") Long userId, @Param("tid") Long tid);
}
